import React from 'react'
import axios from 'axios'
import { useEffect, useState } from 'react'
import tcss from '../css/Team.module.css'
console.log(axios);

const Team = () => {
    const [data, setdata] = useState([]);
    useEffect(() => {
        axios("/tyj/aboutUs").then((res) => {
            setdata(res.data);
        })
    }, []);
    return (
        <div className={tcss.team}>
            <h2 className={tcss.h2}>团队</h2>
            <div className={tcss.team_box}>
                {data.map((el, index) => {
                    return <div className={tcss.person} key={index}>
                        <img src={el.Mtouxiang} alt="" className={tcss.touxiang} />
                        <p className={tcss.Mname}>{el.Mname}</p>
                        <p className={tcss.qianming}>{el.qianming}</p>
                    </div>
                })}
            </div>
        </div>
    )

}

export default Team